PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Integrating Applications

Scripts are ideal for performing tasks that involve more than one application. A script can send instructions to one application, get the resulting data, and then pass the data on to one or more additional applications. For example, a script can collect information from a database application and copy it to a spreadsheet application. Figure 2-4 shows a simple script that gets a value from the Count cell of an inventory database and copies it to the Inventory column of a spreadsheet. This script is also shown in Repeat Until.

Figure 2-4   A script that copies information from one application to another

In the same way, a script can use one application to perform an action on data from another application. For example, suppose a word-processing application includes a spelling checker and also supports an AppleScript command to check spelling. You can check the spelling of a block of text from any other application by writing a script that sends the AppleScript command and the text to be checked to the word-processing application, which returns the results to the application that runs the script.

If an action performed by an application can be controlled by a script, that action can be also performed from the Script Editor or from any other application that can run scripts. Every scriptable application is potentially a toolkit of useful utilities that can be selectively combined with utilities from other scriptable applications to perform highly specialized tasks.


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)